package com.ruoyi.wechat.api;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.wechat.domain.OnlineService;
import com.ruoyi.wechat.service.IOnlineServiceService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 在线客服消息表Controller
 * 
 * @author ruoyi
 * @date 2024-08-01
 */
@Api(value = "微信小程序API-在线客服消息表", tags = {"微信小程序API-在线客服消息表"})
@RestController
@RequestMapping("/wechat/service")
public class WxOnlineServiceController extends BaseController
{
    @Autowired
    private IOnlineServiceService onlineServiceService;

    /**
     * 查询在线客服消息表列表
     */
    @GetMapping("/list/{messageId}")
    public TableDataInfo list(@PathVariable("messageId") String userId)
    {
        startPage();
        List<OnlineService> list = onlineServiceService.selectOnlineServiceListByUserId(userId);
        return getDataTable(list);
    }

}
